﻿<ServiceContract()> _
Public Interface IDisplayServer

    <OperationContract()> _
    Function Hello() As Integer

    <OperationContract()>
    Function NeedUpdate(ByVal DisplayID As Integer) As RequiredUpdate

    <OperationContract()> _
    Sub MainPage(ByVal DisplayID As Integer)

    <OperationContract()> _
    Function GetGames(ByVal DisplayID As Integer) As Dictionary(Of String, Integer)

    <OperationContract()> _
    Function GetStatus(ByVal DisplayID As Integer) As String

    <OperationContract(isoneway:=True)> _
    Sub GamePage(ByVal DisplayID As Integer, ByVal GameName As String)

    <OperationContract()> _
    Function GetScores(ByVal DisplayID As Integer) As SortedList(Of String, Long)

    <OperationContract()> _
    Function GetQuestion(ByVal DisplayID As Integer) As Question

    <OperationContract()> _
    Function GetCorrectAnswer(ByVal DisplayID As Integer) As String

End Interface

<DataContract()> _
Public Enum RequiredUpdate
    <EnumMember()> None
    <EnumMember()> CurrentGames
    <EnumMember()> Status
    <EnumMember()> Scores
    <EnumMember()> SendQuestion
    <EnumMember()> StartQuestion
    <EnumMember()> EndQuestion
    <EnumMember()> EndGame
End Enum

Public Class Display
    Dim _RequiredUpdates As List(Of RequiredUpdate)
    Dim _GameInteger As Integer
    Dim _LastSeen As Date

    Public Property RequiredUpdates As List(Of RequiredUpdate)
        Get
            Return _RequiredUpdates
        End Get
        Set(ByVal value As List(Of RequiredUpdate))
            _RequiredUpdates = value
        End Set
    End Property

    Public Property GameInteger As Integer
        Get
            Return _GameInteger
        End Get
        Set(ByVal value As Integer)
            _GameInteger = value

        End Set
    End Property

    Public Property LastSeen As Date
        Get
            Return _LastSeen
        End Get
        Set(ByVal value As Date)
            _LastSeen = value
        End Set
    End Property
End Class